home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / diskhand.bas (.txt) < prev    next >
Encoding:
GW-BASIC  |  1984-07-03  |  1.3 KB  |  39 lines

  1. 10  '***** Disk Handler *****  from the October, 1983 issue of SofTalk, p.71.
  2. 20  '
  3. 30  'FIND or SET the default drive in a BASIC program.
  4. 40  '
  5. 50  'Written by Howard Glosser
  6. 60  'DEF SEG=&H1700. Use DEF SEG &HF00 for machine with LESS then 96K.
  7. 70  '
  8. 80  'This builds and checks the subroutine.
  9. 90  '
  10. 100  CLS
  11. 110  DEF SEG=&H1700' Use DEF SEG &HF00 for machine with LESS then 96K.
  12. 120  FOR MEM%=0 TO 66
  13. 130  READ DT%
  14. 140  POKE MEM%,DT%
  15. 150  CHECKSUM%=CHECKSUM%+DT%
  16. 160  NEXT
  17. 170  READ DT%
  18. 180  IF CHECKSUM%=DT% THEN 230
  19. 190  PRINT"Error in DATA Statements - Check lines 290 - 370":END
  20. 200  '
  21. 210  '******* This Saves the routine
  22. 220  '
  23. 230  BSAVE"DISKHAND.BIN",0,&H43
  24. 240  PRINT"Diskhandler routine created."
  25. 250  END
  26. 260  '
  27. 270  '***** DATA Statements to build routine
  28. 280  '
  29. 290  DATA &H55,&H8B,&HEC,&H8B,&H76,&H8,&H8B,&H14
  30. 300  DATA &H83,&HFA,&H1,&H74,&H8,&H83,&HFA,&H2
  31. 310  DATA &H74,&H10,&H90,&HEB,&H2A,&H90,&HB4,&H19
  32. 320  DATA &HCD,&H21,&HFE,&HC0,&H32,&HE4,&HC,&H40
  33. 330  DATA &HEB,&H15,&H90,&H8B,&H76,&H6,&H8B,&H7C
  34. 340  DATA &H1,&H8B,&H15,&H80,&HF2,&H40,&HFE,&HCA
  35. 350  DATA &HB4,&HE,&HCD,&H21,&HEB,&H9,&H90,&H8B
  36. 360  DATA &H7E,&H6,&H8B,&H75,&H1,&H88,&H4,&H5D
  37. 370  DATA &HCA,&H4,&H0,&H1D35
  38. 380  END' of program.
  39.